<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title>添加权限</title>
        <meta http-equiv="content-type" content="text/html;charset=utf-8">
        <link href="{$smarty.const.ADMIN_CSS_URL}mine.css" type="text/css" rel="stylesheet">
        <style type="text/css">
            {literal}
            li{list-style: none;}
            {/literal}
        </style>
    </head>

    <body>

        <div class="div_head">
            <span>
                <span style="float:left">当前位置是：权限管理-》添加权限信息</span>
                <span style="float:right;margin-right: 8px;font-weight: bold">
                    <a style="text-decoration: none" href="{$smarty.const.__MODULE__}/Goods/showlist">【返回】</a>
                </span>
            </span>
        </div>
        <div></div>

        <div style="font-size: 13px;margin: 10px 5px">
            <form action="{$smarty.const.__SELF__}" method="post" enctype="multipart/form-data">
                <div>正在为角色：<span style="font-size:25px; font-weight:bold;">{$role_name}</span>分配权限</div>
                {*首先显示父级权限，在内部嵌套判断显示对应的子级权限 ul  li*}
                <ul>
                {foreach $pauth_info as $k => $v}
                    <li>{$v.auth_name}<input type="checkbox" name="authname[]" value="{$v.auth_id}" {if in_array($v.auth_id,$auth_ids_arr) }checked='checked'{/if} />
                        <ul>
                            {foreach $sauth_info as $kk => $vv}
                            {if $vv.auth_pid == $v.auth_id}
                            <li>{$vv.auth_name}<input type="checkbox" name="authname[]" value="{$vv.auth_id}" {if in_array($vv.auth_id,$auth_ids_arr) }checked='checked'{/if}/>
                                  <ul>
                                      {foreach $tauth_info as $kkk => $vvv}
                                      {if $vvv.auth_pid == $vv.auth_id}
                                      <li>{$vvv.auth_name}<input type="checkbox" name="authname[]" value="{$vvv.auth_id}" {if in_array($vvv.auth_id,$auth_ids_arr) }checked='checked'{/if}/></li>
                                      {/if}
                                      {/foreach}
                                  </ul>
                            </li>
                            {/if}
                            {/foreach}
                        </ul>
                   </li>
                {/foreach}
                </ul>
                <input type="submit" value="分配权限" />
            </form>
        </div>
    </body>
</html>
